package com.thomas.framework.controller.admin;

import com.thomas.framework.core.ControllerBase;
import com.thomas.framework.entity.SysUser;
import com.thomas.framework.utils.WebContext;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by taohj on 2015/1/6.
 */
public  abstract class AbstractControllser extends ControllerBase {


    public SysUser getCurrentUser(){

        return (SysUser) WebContext.getHttpSession().getAttribute("user");
    }

    public  void setCurrentUser(SysUser user){
        WebContext.getHttpSession().setAttribute("user",user);
    }


    @Override
    protected ModelAndView handleRequestInternal(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) throws Exception {
        return null;
    }
}
